let person: { name: string, age?: number, sex?: "男" | "女" } = { name: '张三', age: 14, sex: "男" }
interface Person {
  name: string,
  age?: number,
  sex?: "男" | "女"
}
let pp:Person = { name: '李四', age: 18, sex: "男" }

type Person2 = {
  name: string,
  age?: number,
  sex?: "男" | "女"
}

let a:Person2 = { name: '王五', age: 19, sex: "男" }

let{age,sex}=a
console.log(a.age)